<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>immediatelyInitObject</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>

<script>
$(document).ready(function () {
	
	var immediatelyInitObject = ({
		maxwidth: 600,
		maxheight: 400,
		mynickname: "byeonely",
		
		gimmeMax: function () {
			return this.maxwidth + "x" + this.maxheight;
		},

		// 초기화
		init: function () {
			console.log(this.gimmeMax());
			
			// 즉시실행객체의 참조 유지
			return this;
		}
		
	}).init();
	
	
	console.log(immediatelyInitObject.mynickname);
});
</script>

</head>
    <body>
	    <h3>즉시 객체 초기화</h3>
    </body>
</html>